{% extends 'base.html' %}

{% block title %}个人信息{% endblock %}

{% block content %}
<div class="row justify-content-center">
    <div class="col-md-8">
        <div class="card shadow">
            <div class="card-header bg-primary text-white">
                <h4 class="mb-0">个人信息</h4>
            </div>
            <div class="card-body">
                <form method="post">
                    <div class="mb-3">
                        <label for="username" class="form-label">用户名</label>
                        <input type="text" class="form-control" id="username" value="{{ current_user.username }}" readonly>
                    </div>
                    <div class="mb-3">
                        <label for="user_type" class="form-label">用户类型</label>
                        <input type="text" class="form-control" id="user_type" value="{{ current_user.get_user_type_display() }}" readonly>
                    </div>
                    <div class="mb-3">
                        <label for="new_password" class="form-label">新密码</label>
                        <input type="password" class="form-control" id="new_password" name="new_password">
                        <div class="form-text">如果不需要修改密码，请留空</div>
                    </div>
                    <div class="mb-3">
                        <label for="confirm_password" class="form-label">确认新密码</label>
                        <input type="password" class="form-control" id="confirm_password" name="confirm_password">
                    </div>
                    <button type="submit" class="btn btn-primary">更新信息</button>
                </form>
            </div>
        </div>
    </div>
</div>
{% endblock %} 